# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=keysmith
pkgver=0.2
pkgrel=0
pkgdesc="OTP client for Plasma Mobile and Desktop"
url="https://invent.kde.org/kde/keysmith"
arch="all !armhf"
license="GPL-3.0-or-later"
depends="kirigami2"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev qt5-qtquickcontrols2-dev kirigami2-dev ki18n-dev libsodium-dev"
subpackages="$pkgname-lang"
source="https://download.kde.org/stable/keysmith/$pkgver/keysmith-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="c9c7a319c3b5e9abf6a59547094352ce072ecea8f60e49531e7876e6ae44287ea3cb2b18371a37bef04949c9a89b4913309f795c066ebba5f56ab53a1c24bbe9  keysmith-v0.2.tar.gz"
